package cn.melon.view.control;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import cn.melon.helper.BaseRequset;
import cn.melon.mod.dorm.DormRequest;
import cn.melon.mod.library.LibraryRequest;
import cn.melon.mod.roll.RollRequest;
import cn.melon.mod.sc.ScRequest;
import cn.melon.mod.store.StoreRequest;

public class TestWindowController implements ActionListener{

    @Override
    public void actionPerformed(ActionEvent e) {
        System.out.println(e.getActionCommand());
        switch (e.getActionCommand()) {
            case "学籍管理":
                onRoll();
                break;
            case "图书管理":
                onLibrary();
                break;
            case "宿舍管理":
                onDorm();
                break;
            case "商店管理":
                onStore();
                break;
            case "选课管理":
                onSc();
                break;
            default:
        }
    }
    
    void onRoll() {
        BaseRequset request = new RollRequest();
        request.makeRequset();
    }
    
    void onLibrary() {
        BaseRequset request = new LibraryRequest();
        request.makeRequset();
    }
    
    void onDorm() {
        BaseRequset request = new DormRequest();
        request.makeRequset();
    }
    
    void onStore() {
        BaseRequset request = new StoreRequest();
        request.makeRequset();
    }
    
    void onSc() {
        BaseRequset request = new ScRequest();
        request.makeRequset();
    }
}
